<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Email google</title>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript">
$(function (){
	$('#caixaEmail').bind('keyup', function(event) {
		var codigoLetra = event.keyCode;
// 		var conteudoDaDiv = $("#caixaEmail").clone().children().remove().end().text();
		var conteudoDaDiv = $("#caixaEmail").text();

		var ar = new Array();

		if((codigoLetra == 59) || (codigoLetra == 188) || (codigoLetra == 32) || (codigoLetra == 9)){
			ar = $("#caixaEmail").html("<span style='background-color: red;'>" +conteudoDaDiv+"</span>")
			
			for(var i = 0; i < ar.length; i++){
				alert("denro for")
				ar.push(ar[i]);
				break;
				$("#caixaEmail").html(ar);
			}
			
			alert(ar);
// 			ar.push()
			
// 			alert(codigoLetra+conteudoDaDiv);
		}
		
	});
});	
</script>
</head>
	<body>
		<div id="caixaEmail" contenteditable="true" style="width:300px; height:200px; border:#000000 1px solid;">
<!-- 		<input type="text" id="caixaEmail" value="Ecrever" size="30" "> -->
<!-- 		<textarea id="caixaEmail" rows="7" cols="50"></textarea> -->
		</div>
	</body>	
</html>	